// 统一配置请求根路径
let baseURL = 'http://www.itcbc.com:8080';
$.ajaxPrefilter(function (option) {
    option.url = baseURL + option.url;
    option.headers = {
        Authorization: localStorage.getItem('token')
    }
    
    //ajax完成后
    option.complete = function (xhr) {
        let res = xhr.responseJSON;
        console.log(xhr)
        if (res && res.status === 1 & res.messgae === '身份认证失败'){
        localStorage.removeItem('token');
            location.href = './login.html';
        }
    }
});